package ynu.edu.Feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.Map;

@FeignClient(name = "provider")
public interface ProviderClient {

    @GetMapping("/data/{id}")
    String getData(@PathVariable("id") String id);

    @PostMapping("/data")
    String createData(@RequestBody Map<String, String> data);

    @PutMapping("/data/{id}")
    String updateData(@PathVariable("id") String id, @RequestBody Map<String, String> data);

    @DeleteMapping("/data/{id}")
    String deleteData(@PathVariable("id") String id);
}
